/**
 * @program: clms-second
 * @description: 评论控制层
 * @author: mitu_echo
 * @create: 2021-07-26 21:15
 **/

package com.second.lease.controller;

import com.second.common.pojo.R;
import com.second.lease.pojo.entity.CarComment;
import com.second.lease.service.CarCommentService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/carcomment")
public class CarCommentController {

    @Autowired
    private CarCommentService carCommentService;

    @ApiOperation("查询评论")
    @RequestMapping("/showCarComment")
    public R showCarComment(Integer pageno,Integer pagesize) {

        return carCommentService.showCarComment(pageno,pagesize);
    }

    @ApiOperation("添加评论")
    @RequestMapping("/addCarComment")
    public R addCarComment(@RequestBody CarComment carComment) {

        return carCommentService.addCarComment(carComment);
    }
}
